A container technology is an operating system-based lightweight virtualization technology. A container runs on user space in an operating system. Containers on one host can share an operating system kernel. In recent years, the container technology gradually becomes a research hotspot in cloud computing, and one of crucial container technologies is image layering. An image used in the container technology includes image layers. Each image layer includes various modifications made based on a parent image layer of the image layer. Therefore, a complete image needs to include all image layers required for the image. A user can create and release an image. Alternatively, the user can download a required image from an image registry, and after downloading the image onto a host, can start, according to the downloaded image, a container corresponding to the image.
Generally, multiple hosts for running containers run in a container system. When a user expects to deploy a container in the container system, the container system first needs to select a host from the multiple hosts to run the container. Then, the host detects whether an image layer stored on the selected host can support start of the container. If the image layer stored on the selected host cannot support start of the container, the host needs to request an image layer that is lacking from the image registry. Therefore, a time consumed for deploying a container includes a time for downloading an image required by the container and a time for starting the container after the image is downloaded. Because the time for starting the container is quite short after the image is downloaded, what limits a container deployment speed is usually the relatively long time for downloading the image.